import { createRouter, createWebHistory } from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import home from '../views/home/home.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    component:home,
    meta:{
    title:'首页',
    isNav:true,
    }
  },
  {
    path:'/car',
    name:'car',
    component: () => import('../views/car/car.vue'),
    meta:{
      title:'购物车',
      isNav:true,
     }
  },
  {
    path:'/carcheck',
    name:'carcheck',
    component: () => import('../views/order/carCheck.vue'),
    meta:{
      title:'订单详情',
      isNav:false,
    }
  },
  {
    path:'/my',
    name:'my',
    component: () => import('../views/my/my.vue'),
    meta:{
      title:'我的',
      isNav:true,
     }
  },
  {
    path: '/login',
    name: 'login ',
    component:()=>import('../views/login/login.vue'),
    meta:{
    title:'登录',
    isNav:false,
    }
  },
  {
    path: '/registered',
    name: 'registered ',
    component:()=>import('../views/register/registered.vue'),
    meta:{
    title:'注册',
    isNav:false,
    }
  },
  {
    path:'/type',
    name:'type',
    component: () => import('../views/type/type.vue'),
    meta:{
      title:'类型',
      isNav:true,
    }
  },
  {
    path:'/typeThr',
    name:'typeThr',
    component: () => import('../views/type/typeThr.vue'),
    meta:{
      title:'三级类型',
      isNav:false,
    }
  },
  {
    path: '/set',
    name: 'set',
    component: () => import( '../views/my/set.vue'),
    meta:{
      isFooter:false,
    }
  },
  
  {
    path: '/addAddress',
    name: 'addAddress',
    component: () => import( '../views/address/add-address.vue'),
    meta:{
      isFooter:false,
    }
  },
  {
    path: '/myAddress',
    name: 'myAddress',
    component: () => import( '../views/address/my-address.vue'),
    meta:{
      isFooter:false,
    }
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import( '../views/detail/detail.vue'),
    meta:{
      isFooter:false,
    }
  },
  {
    path: '/brandDetail',
    name: 'brandDetail',
    component: () => import( '../views/detail/brand-detail.vue'),
    meta:{
      isFooter:false,
    }
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router


